<script setup>
import { RouterView, useRoute } from 'vue-router'
import contactInfor from '@/components/contactInfor.vue'
import { useUserStore } from '@/stores/index'
const userStore = useUserStore()
const route = useRoute()
// window.onkeydown =
//     window.onkeyup =
//     window.onkeypress =
//         function (event) {
//             // 判断是否按下F12，F12键码为123
//             if (event.keyCode == 123) {
//                 event.preventDefault() // 阻止默认事件行为
//                 window.event.returnValue = false
//             }
//         }
// window.oncontextmenu = function () {
//     event.preventDefault() // 阻止默认事件行为
//     return false
// }
document.title = userStore.systemInfo
    ? userStore.systemInfo.gatewayName
    : '边缘计算网关'
</script>

<template>
    <contactInfor v-if="route.path !== '/login'" />
    <RouterView />
    <!-- <router-view v-slot="{ Component }">
        <keep-alive>
            <component
                :is="Component"
                :key="$route.name"
                v-if="route.meta.keepAlive"
            />
        </keep-alive>
        <component
            :is="Component"
            :key="$route.name"
            v-if="!route.meta.keepAlive"
        />
    </router-view> -->
</template>

<style lang="scss">
@import './assets/css/common.scss';
</style>
